<?php
/********************************************************
** Copyright 2010-2013. Todos los derechos reservados. **
** Desarrollado y Gestionado por:					   **
** Sugey Quintero (Analista)						   **
** José G. De Freitas (Programador)					   **
** Klaudia Uribe (Diseñadora Web)					   **
** Cesar Isturiz (Diseñador Web)					   **
**				S E A  v1.0							   **
*********************************************************/

session_start();
include("conexion.php");

	if (isset($_SESSION['name']) and isset($_SESSION['tiempo'])) {
        include("Tiempo.php");
	date_default_timezone_set('America/Caracas'); setlocale(LC_TIME, 'spanish');
	$usuario = $_SESSION['name'];
	$fecha = date("Y-m-d H:i:s");
	$auditoria = mysql_query("INSERT INTO auditoria SELECT '$usuario', '$fecha' , 'Buscador de estudiante' ");

    }else {
		echo "<script>alert('Debe ingresar al sistema primero');</script>";
		echo "<script>document.location.href='index.php';</script>";
	}

$Nombres=$_GET['Nombres'];
$Apellidos=$_GET['Apellidos'];
if ($Nombres || $Apellidos){
	if($Nombres != '' && $Apellidos == ''){
		$B_est = mysql_query("SELECT Cedula_e, Nombres, Apellidos FROM estudiante WHERE Nombres LIKE '%$Nombres%' ");
	}else if($Nombres == '' && $Apellidos != ''){
		$B_est = mysql_query("SELECT Cedula_e, Nombres, Apellidos FROM estudiante WHERE Apellidos LIKE '%$Apellidos%' ");
	}else {
	
	$sql = mysql_query("SELECT representante.* FROM representante, estudiante_representante WHERE representante.Cedula=estudiante_representante.Cedula_r AND estudiante_representante.Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%')");
	$est = mysql_query("SELECT estudiante.*, inscripcion.Periodo, inscripcion.Grado, inscripcion.Seccion FROM  estudiante_representante, estudiante INNER JOIN inscripcion ON estudiante.Cedula_e=inscripcion.Cedula_e WHERE estudiante.Cedula_e=estudiante_representante.Cedula_e AND estudiante_representante.Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%')");
	$enf = mysql_query("SELECT * FROM enfermedades_padecidas WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%') ");
	$madre = mysql_query("SELECT * FROM madre WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%')");
	$padre = mysql_query("SELECT * FROM padre WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%')");
	//$periodo = mysql_query("SELECT Periodo, Grado, Seccion FROM inscripcion WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%')");
	$conducta = mysql_query("SELECT * FROM conducta_emocional WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%') ");
	$documentos = mysql_query("SELECT * FROM documentos WHERE Cedula_e=(SELECT Cedula_e FROM estudiante WHERE Nombres LIKE '%$Nombres%' AND Apellidos LIKE '%$Apellidos%') ");
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Buscador Estudiante</title>
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico">
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- calendario-->
<link rel="stylesheet" type="text/css" href="src/css/jscal2.css" />
<link rel="stylesheet" type="text/css" href="src/css/border-radius.css" />
<link rel="stylesheet" type="text/css" href="src/css/steel/steel.css" />
<script type="text/javascript" src="src/js/jscal2.js"></script>
<script type="text/javascript" src="src/js/lang/es.js"></script>
<!-- fin calendario-->
<!-- botones-->
<link type="text/css" href="js/css/smoothness/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />      
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> 
<script>
var j$ = jQuery.noConflict();
j$(document).ready(function(){
j$(".button").button();
});

j$(function(){
	j$('#menu li a').click(function(event){
		var elem = j$(this).next();
		if(elem.is('ul')){
			event.preventDefault();
			j$('#menu ul:visible').not(elem).slideUp();
			elem.slideToggle();
		}
	});
});
</script>
<!-- fin botones-->
<script>
function habilitar(form) {
  for (i=0; ele = form.elements[i]; i++)
    if (ele.type == 'text'){
		ele.readOnly = false;
	}
	document.getElementById('Guardar').style.display="inline";
}

<!--
var nav4 = window.Event ? true : false;
function acceptNum(evt){   
var key = nav4 ? evt.which : evt.keyCode;   
return (key <= 13 || (key>= 48 && key <= 57));
}
//-->
</script>
</head>

<body>
<div id="wrap">
<div id="header">
<div id="hora">
<?php include("Hora.php"); ?>
</div>
<div id="topnav">
	<?php include("MenuSuperior.php"); ?>
</div>
</div>
<div id="content">
<div id="left">
<div class="post">
<div class="post_h">

</div>

<div class="postcontent">
<form action='BuscadorEstudiante.php' method='GET'>
<blockquote><h2 align="center">DATOS DEL ESTUDIANTE</h2></blockquote>
			<fieldset>
			<legend align=left><b><font size=2>BUSCADOR</font></b></legend>
			<table width=100% cellspacing=5 cellpadding=0 border=0>
			<tr>
				<td align="center">Nombre &oacute; Apellido: <input type=text name="Nombres" value='<?php echo $Nombres; ?>'> &oacute; <input type=text name="Apellidos" value='<?php echo $Apellidos; ?>'> <input class=button type=submit value=Buscar></td>
			</tr>
			</table>
			</fieldset>
</form>
<div class="post">
<span></span></div>

<?php

if ($B_est){
			echo "<fieldset>";
			echo "<legend align=left><b><font size=2>RESULTADOS OBTENIDOS</font></b></legend>";
			echo "<center>";
			echo "<table width=100% cellspacing=5 cellpadding=0 border=0>";
			echo "<tr>";
				echo "<th>Nro</th><th>C.E. / C.I.</th><th>Nombres</th><th>Apellidos</th>";
			echo "</tr>";
$a=1;
				while($row=mysql_fetch_array($B_est)){
					echo "<tr align=center>";
					echo "<td>$a</td><td><a href='BuscadorEstudiante.php?Nombres=$row[1]&Apellidos=$row[2]' title='Click aqui para visualizar o actualizar los datos del estudiante'>$row[0]</a></td><td>$row[1]</td><td>$row[2]</td>";
					echo "</tr>"; $a += 1;
				}
			echo "</table>";
			echo "</center>";
			echo "</fieldset>";
}

if ($sql && $est){
		echo "<form ACTION='ResBuscadorEstudiante.php' METHOD='POST'>";
		echo "<fieldset>";
		echo "<legend align=left><b><font size=2>ESTUDIANTE</font></b></legend>";
		echo "<table width=100%  cellspacing=5 cellpadding=0 border=0>";
			while($row=mysql_fetch_array($est)){
				echo "<tr>";
				echo "<td width=50%><b>Periodo cursando:</b></td><td>$row[15]</td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td width=50%><b>C&eacute;dula de Identidad o Escolar:</b></td><td>$row[0]</td>";
				echo "<input type=hidden name=Cedula_e value='$row[0]'>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Nombres:</b></td><td><input type=text name='Nombres_e' value='$row[1]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Apellidos:</b></td><td><input type=text name='Apellidos_e' value='$row[2]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Sexo:</b></td><td><input type=text name='Sexo_e' value='$row[3]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Lugar de Nacimiento:</b></td><td><input type=text name='L_nac' value='$row[4]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Fecha de Nacimiento:</b></td><td><input type=text name='F_nac' value='$row[5]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Religi&oacute;n:</b></td><td><input type=text name='Religion' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Direcci&oacute;n:</b></td><td><input type=text name='Direccion_e' value='$row[7]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Lugar que ocupa entre sus hermanos:</b></td><td><input type=text name='Lug_hermanos' value='$row[8]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tiene hermanos en la instituci&oacute;n:</b></td><td><input type=text name='H_inst' value='$row[9]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Escribe con la mano:</b></td><td><input type=text name='Mano' value='$row[10]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Posee beca:</b></td><td><input type=text name='Beca' value='$row[11]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Practica alg&uacute;n deporte:</b></td><td><input type=text name='Deporte' value='$row[12]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Posee control m&eacute;dico:</b></td><td><input type=text name='C_medico' value='$row[13]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Presenta dificultad:</b></td><td><input type=text name='Dificultad' value='$row[14]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Grado/Secci&oacute;n cursando:</b></td><td>$row[16] Grado/ Secci&oacute;n $row[17]</td>";
				echo "</tr>";
			}
		echo "</table>";
		echo "</fieldset>";
		
		echo "<div class=post>";
		echo "<span></span></div>";
					
		echo "<fieldset>";
		echo "<legend align=left><b>Enfermedades Padecidas</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=3 border=0>";
				echo "<tr>";
				echo "<td width=50%><b>Enfermedad:</b></td><td><b>Descripci&oacute;n:</b></td>";
				echo "</tr>";
			while($row=mysql_fetch_array($enf)){
				echo "<tr>";
				echo "<td><input type=text name='Nomb_enf[]' value='$row[1]' size=40 readonly> </td><td><input type=text name='Descripcion_enf[]' value='$row[2]' size=40 readonly></td>";
				echo "</tr>";
			}
				echo "<tr><td><br></td></tr>";
				echo "<tr>";
				echo "<td><b>El parto fu&eacute;:</b></td><td><input type=text name='Parto' value='$row[3]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Present&oacute; problemas al nacer:</b></td><td>";
						if($row[4] == 'Si') { echo "<input type=checkbox name='P_nacer' value='Si' checked> Si&nbsp <input type=checkbox name='P_nacer' value='No'> No&nbsp"; } else{ echo "<input type=checkbox name='P_nacer' value='Si'> Si&nbsp <input type=checkbox name='P_nacer' value='No' checked> No&nbsp"; }
						echo "<input type=text name='P_nacer_e' value='$row[5]' size=26 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Asiste control pediatrico:</b></td><td><input type=text name='C_ped' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
		echo "</table>";
		echo "</fieldset>";
		
		echo "<div class=post>";
		echo "<span></span></div>";
					
		echo "<fieldset>";
		echo "<legend align=left><b>Conducta Emocional</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=3 border=0>";
			while($row=mysql_fetch_array($conducta)){
				echo "<tr>";
				echo "<td width=50%><b>Como describir&iacute;a al estudiante:</b></td><td>";
							if($row[1] == 'Si') { echo "<input type=checkbox name='Desc_est_tranq' value='Si' checked> Tranquilo(a)&nbsp&nbsp"; } else{ echo "<input type=checkbox name='Desc_est_tranq' value='Si'> Tranquilo(a)&nbsp&nbsp"; }
							if($row[2] == 'Si') { echo "<input type=checkbox name='Desc_est_ti' value='Si' checked> Timido(a)<br>"; } else{ echo "<input type=checkbox name='Desc_est_ti' value='Si'> Timido(a)<br>"; }
							if($row[3] == 'Si') { echo "<input type=checkbox name='Desc_est_ca' value='Si' checked> Cari&ntilde;oso(a)&nbsp;&nbsp&nbsp"; } else{ echo "<input type=checkbox name='Desc_est_ca' value='Si'> Cari&ntilde;oso(a)&nbsp;&nbsp&nbsp"; }
							if($row[4] == 'Si') { echo "<input type=checkbox name='Desc_est_in' value='Si' checked> Inquieto(a)<br>"; } else{ echo "<input type=checkbox name='Desc_est_in' value='Si'> Inquieto(a)<br>"; }
							if($row[5] == 'Si') { echo "<input type=checkbox name='Desc_est_ex' value='Si' checked> Extrovertido(a)</td>"; } else{ echo "<input type=checkbox name='Desc_est_ex' value='Si'> Extrovertido(a)</td>"; }
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Cuando sancionan al ni&ntilde;o(a) por lo general, se ponen de acuerdo los padres? :</b></td><td><input type=text name='C_Sancion' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Que tipo de sanci&oacute;n aplican?:</b></td><td>";
						if($row[7] == 'Si') { echo "<input type=checkbox name='Sancion_f' value='Si' checked> Formativa&nbsp;&nbsp;"; } else{ echo "<input type=checkbox name='Sancion_f' value='Si'> Formativa&nbsp;&nbsp;"; }
						if($row[8] == 'Si') { echo "<input type=checkbox name='Sancion_c' value='Si' checked> Corporal</td>"; } else{ echo "<input type=checkbox name='Sancion_c' value='Si'> Corporal</td>"; }
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Que hace Ud. cuando el ni&ntilde;o(a) miente? :</b></td><td><input type=text name='C_miente' value='$row[9]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Acostumbra con sus hijos a:</b></td><td>";
						if($row[10] == 'Si') { echo "<input type=checkbox name='Acostumbra_j' value='Si' checked> Jugar&nbsp;&nbsp;"; } else{ echo "<input type=checkbox name='Acostumbra_j' value='Si'> Jugar&nbsp;&nbsp;"; }
						if($row[11] == 'Si') { echo "<input type=checkbox name='Acostumbra_c' value='Si' checked> Conversar&nbsp;&nbsp;"; } else{ echo "<input type=checkbox name='Acostumbra_c' value='Si'> Conversar&nbsp;&nbsp;"; }
						if($row[12] == 'Si') { echo "<input type=checkbox name='Acostumbra_lc' value='Si' checked> Leer cuentos</td>"; } else{ echo "<input type=checkbox name='Acostumbra_lc' value='Si'> Leer cuentos</td>"; }
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tiempo que le dedica cada uno de los padres al d&iacute;a :</b></td><td>Madre <input type=text name='T_dedicado_m' value='$row[13]' size=33 readonly><br>Padre <input type=text name='T_dedicado_p' value='$row[14]' size=33 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Realiza viajes o paseos frecuentes:</b></td><td>$row[15] a: <input type=text name='R_viaje_e' value='$row[16]' size=37 readonly></td>";
				echo "</tr>";
			}
		echo "</table>";
		echo "</fieldset>";
			
		echo "<div class=post>";
		echo "<span></span></div>";
			
		echo "<fieldset>";
		echo "<legend align=left><b>Representante</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=3 border=0>";
			while($row=mysql_fetch_array($sql)){
				echo "<tr>";
				echo "<td width=50%><b>Cedula de Identidad:</b></td><td>$row[0]</td>";
				echo "<input type=hidden name=Cedula_r value='$row[0]'>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Nombres:</b></td><td><input type=text name='Nombres_r' value='$row[1]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Apellidos:</b></td><td><input type=text name='Apellidos_r' value='$row[2]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Sexo:</b></td><td><input type=text name='Sexo_r' value='$row[3]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono de Casa:</b></td><td><input type=text name='Tlf_casa_r' value='$row[4]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono M&oacute;vil:</b></td><td><input type=text name='Tlf_movil_r' value='$row[5]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Oficio:</b></td><td><input type=text name='Oficio_r' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Lugar de trabajo:</b></td><td><input type=text name='Lugar_t_r' value='$row[7]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Saberes:</b></td><td><input type=text name='Saber_r' value='$row[8]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Parentesco:</b></td><td><input type=text name='Parentesco_r' value='$row[9]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Direcci&oacute;n:</b></td><td><input type=text name='Direccion_r' value='$row[10]' size=40 readonly></td>";
				echo "</tr>";
			}
		echo "</table>";
		echo "</fieldset>";

		echo "<div class=post>";
		echo "<span></span></div>";

		echo "<fieldset>";
		echo "<legend align=left><b>Madre</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=3 border=0>";
			while($row=mysql_fetch_array($madre)){
				echo "<tr>";
				echo "<td width=50%><b>Cedula de Identidad:</b></td><td>$row[0]</td>";
				echo "<input type=hidden name=Cedula_m value='$row[0]'>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Nombres:</b></td><td><input type=text name='Nombres_m' value='$row[1]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Apellidos:</b></td><td><input type=text name='Apellidos_m' value='$row[2]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono de Casa:</b></td><td><input type=text name='Tlf_casa_m' value='$row[3]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono M&oacute;vil:</b></td><td><input type=text name='Tlf_movil_m' value='$row[4]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Oficio:</b></td><td><input type=text name='Oficio_m' value='$row[5]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Lugar de trabajo:</b></td><td><input type=text name='Lugar_t_m' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Saberes:</b></td><td><input type=text name='Saber_m' value='$row[7]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Direcci&oacute;n:</b></td><td><input type=text name='Direccion_m' value='$row[8]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Est&aacute; vivo?</b></td><td><input type=text name='Vive_m' value='$row[9]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Vive con el ni&ntilde;o</b></td><td><input type=text name='Vive_n_m' value='$row[10]' size=40 readonly></td>";
				echo "</tr>";
			}
		echo "</table>";
		echo "</fieldset>";

		echo "<div class=post>";
		echo "<span></span></div>";
		
		echo "<fieldset>";
		echo "<legend align=left><b>Padre</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=3 border=0>";
			while($row=mysql_fetch_array($padre)){
				echo "<tr>";
				echo "<td width=50%><b>Cedula de Identidad:</b></td><td>$row[0]</td>";
				echo "<input type=hidden name=Cedula_p value='$row[0]'>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Nombres:</b></td><td><input type=text name='Nombres_p' value='$row[1]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Apellidos:</b></td><td><input type=text name='Apellidos_p' value='$row[2]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono de Casa:</b></td><td><input type=text name='Tlf_casa_p' value='$row[3]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Tel&eacute;fono M&oacute;vil:</b></td><td><input type=text name='Tlf_movil_p' value='$row[4]' size=40 onKeyPress='return acceptNum(event)' readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Oficio:</b></td><td><input type=text name='Oficio_p' value='$row[5]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Lugar de trabajo:</b></td><td><input type=text name='Lugar_t_p' value='$row[6]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Saberes:</b></td><td><input type=text name='Saber_p' value='$row[7]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Direcci&oacute;n:</b></td><td><input type=text name='Direccion_p' value='$row[8]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Est&aacute; vivo?</b></td><td><input type=text name='Vive_p' value='$row[9]' size=40 readonly></td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td><b>Vive con el ni&ntilde;o</b></td><td><input type=text name='Vive_n_p' value='$row[10]' size=40 readonly></td>";
				echo "</tr>";
			}
		echo "</table>";
		echo "</fieldset>";

		echo "<div class=post>";
		echo "<span></span></div>";
		
		echo "<fieldset>";
		echo "<legend align=left><b>Documentos Asignados</b></legend>";
		echo "<table width=100% cellspacing=5 cellpadding=0 border=0>";			
			echo "<tr>";
		while($row=mysql_fetch_array($documentos)){
				if($row[1] == 1){ echo "<td><input type=checkbox name='Copia_ced_rep' checked> Copia C&eacute;dula Representante</td>"; } else { echo "<td><input type=checkbox name='Copia_ced_rep'> Copia C&eacute;dula Representante</td>"; }
				if($row[3] == 1){ echo "<td><input type=checkbox name='Fotos_rep' checked> Fotos del Representante</td>"; } else { echo "<td><input type=checkbox name='Fotos_rep'> Fotos del Representante</td>"; }
				if($row[4] == 1){ echo "<td><input type=checkbox name='Fotos_est' checked> Fotos del Estudiante</td>"; } else { echo "<td><input type=checkbox name='Fotos_est'> Fotos del Estudiante</td>"; }
			echo "</tr>";
			echo "<tr>";
				if($row[5] == 1){ echo "<td><input type=checkbox name='Partida_nac' checked> Partida de Nacimiento</td>"; } else { echo "<td><input type=checkbox name='Partida_nac'> Partida de Nacimiento</td>"; }
				if($row[2] == 1){ echo "<td><input type=checkbox name='Copia_ced_est' checked> Copia C&eacute;dula Estudiante</td>"; } else { echo "<td><input type=checkbox name='Copia_ced_est'> Copia C&eacute;dula Estudiante</td>"; }
				if($row[6] == 1){ echo "<td><input type=checkbox name='Certificacion_vac' checked> Certificaci&oacute;n de Vacunas</td>"; } else { echo "<td><input type=checkbox name='Certificacion_vac'> Certificaci&oacute;n de Vacunas</td>"; }
			echo "</tr>";
			echo "<tr>";
				if($row[7] == 1){ echo "<td><input type=checkbox name='Certificacion_apren' checked> Certificaci&oacute;n de Aprendizaje</td>"; } else { echo "<td><input type=checkbox name='Certificacion_apren'> Certificaci&oacute;n de Aprendizaje</td>"; }
			echo "</tr>";
		}
		echo "</table>";
		echo "</fieldset>";
			
		echo "<div class=post>";
		echo "<span></span></div>";
		
		echo "<div name=botonera align=center>";
			echo "<div id=Guardar style='display: none;'>";
				echo "<input class=button type=submit id=Guardar value=Guardar>";
			echo "</div>";
		echo "<input class=button type=button name=Modificar value=Modificar onclick='habilitar(this.form)'>";
		echo "<br>";
		echo "<input class=button type=button value=Volver onClick=\"location='index.php'\">";
		echo "</div>";
		echo "</form>";
} ?>

<div align=right><a title='Ayuda' href="Manuales/ManualUsuario_7.1.pdf" onclick="window.open(this.href,'Manual','params'); return false"><img src='images/help.png' width=8% height=15%></a></div>

</div>
<div class="post_b">
<span></span></div>
</div>


</div>

<div class="post">
<div class="post_h">

</div>


</div>

<?php include("Menu.php"); ?>

<div class="clear"></div>
</div>
<div id="pagebottom"></div>

<div id="footer">
<P>&reg; Derechos Reservados @ CopyRight. 2011-2012</P>
<p>Programadores: Quintero E, Isturiz C, Uribe C, De Freitas J.</p>
</div>
</div>
</body>
</html>
